#include <iostream>
class Complex
{
private:
    int real, imag;
public:
    Complex(int r = 0, int i = 0){real = r; imag = i;}
    Complex operator+(Complex const &obj){
        Complex temp;
        temp.real = this->real + obj.real;
        temp.imag = this->imag + obj.imag;
        return temp;
    }

    Complex operator-(Complex const &obj){
        Complex temp;
        temp.real = this->real - obj.real;
        temp.imag = this->imag - obj.imag;
        return temp;
    }

    Complex operator*(Complex const &obj){
        Complex temp;
        temp.real = this->real * obj.real - this->imag * obj.imag;
        temp.imag = this->real * obj.imag + this->imag * obj.real;
        return temp;
    }
    void print(){
        std::cout << real << " + " << imag << "i" << std::endl;
    }
};


int main(int argc, char *argv[])
{
    Complex c1(3,3), c2(1,2);
    Complex c3 = c1 + c2;
    Complex c4 = c1 - c2;
    Complex c5 = c1 * c2;
    std::cout << "c1 " << std::endl;
    c1.print();
    std::cout << "c2 " << std::endl;
    c2.print();
    std::cout << "c1 + c2 " << std::endl;
    c3.print();
    std::cout << "c1 - c2 " << std::endl;
    c4.print();
    std::cout << "c1 * c2 " << std::endl;
    c5.print();

    return 0;
}

